<%@page import="java.util.ArrayList"%>
<%@page import="jstl.User"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
    ArrayList<User> users = new ArrayList<User>();
    for(int i=1;i<=10;i++) {
    	User user = new User((new Integer(i)).toString());
    	user.setUser_id(i);
    	users.add(user);
    }
    request.setAttribute("users", users);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Insert title here</title>
</head>
<body>
<!-- ${users[0]} -->
<c:set var="users" value="${users}"></c:set>
<table border="1">
<tr><td>user_name</td><td>user_id</td></tr>
<c:forEach var="user" items="${users}" varStatus="status">
<tr>
<td><c:out value="${user.user_name}"></c:out></td>
<td><c:out value="${user.user_id}"></c:out></td>
</tr>
</c:forEach>

</table>
</body>
</html>